/*
 * @Author: your name
 * @Date: 2021-07-06 07:00:43
 * @LastEditTime: 2021-07-07 08:41:10
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \flutter_e_commerece\lib\screens\login_success\components\body.dart
 */
import 'package:flutter/material.dart';
import 'package:shop/components/default_button.dart';
import 'package:shop/screens/complete_profile/complete_profile_screen.dart';
import 'package:shop/screens/home/home_screen.dart';

import '../../../size_config.dart';

class Body extends StatelessWidget {
  const Body({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      child: Column(
        children: [
          SizedBox(height: SizeConfig.screenHeight * 0.04),
          Image.asset(
            "assets/images/success.png",
            width: double.infinity,
            height: SizeConfig.screenHeight * 0.4,
            fit: BoxFit.cover,
          ),
          SizedBox(height: SizeConfig.screenHeight * 0.08),
          Text(
            "Login Success",
            style: TextStyle(
              fontSize: getProportionateScreenWidth(30),
              fontWeight: FontWeight.bold,
              color: Colors.black,
            ),
          ),
          Spacer(),
          SizedBox(
            width: SizeConfig.screenWidth * 0.6,
            child: DefaultButton(
              text: "Back to home",
              press: () {
                // Navigator.pushReplacement(
                //   context,
                //   MaterialPageRoute(
                //     builder: (context) => CompleteProfileScreen(),
                //   ),
                // );
                Navigator.pushReplacementNamed(context, HomeScreen.routeName);
                //
                // Navigator.pushReplacement(
                //     context,
                //     MaterialPageRoute(
                //         builder: (BuildContext context) =>
                //             CompleteProfileForm()));
              },
            ),
          ),
          SizedBox(height: 15),
          SizedBox(
            width: SizeConfig.screenWidth * 0.6,
            child: DefaultButton(
              text: "Complete Profile",
              press: () {
                // Navigator.pushReplacement(
                //   context,
                //   MaterialPageRoute(
                //     builder: (context) => CompleteProfileScreen(),
                //   ),
                // );
                Navigator.pushReplacementNamed(
                    context, CompleteProfileScreen.routeName);
                //
                // Navigator.pushReplacement(
                //     context,
                //     MaterialPageRoute(
                //         builder: (BuildContext context) =>
                //             CompleteProfileForm()));
              },
            ),
          ),
          Spacer(),
        ],
      ),
    );
  }
}
